package lab02.test11;

import java.util.Scanner;

public class test {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        System.out.println("请输入长方形的长和宽：");
        Rectangle rectangle=new Rectangle();
        rectangle.long1=in.nextDouble();
        rectangle.width=in.nextDouble();
        rectangle.printMyWay();

        System.out.println("请输入正形的长和宽：");
        Square square=new Square();
        square.width=in.nextDouble();
        square.long1=in.nextDouble();
        square.printMyWay();

    }
}
